#pragma once

//#include <vld.h>

#include "List.h"
#include "clkHeader.h"
#include "clkObject.h"
#include "clkPartitioner.h"

class clkWorld
{
private:
	clkPartitioner m_partition;
	List<clkObject*> m_objects;
public:
	clkWorld();
	~clkWorld();

	void init(float a_cellWidth, float a_cellHeight);
	void destroy();

	void updatePhysics(float a_time);
	void generateContacts(float a_time);
	void resolveContacts(float a_time);

	void simulate(float a_time);

	clkObject* createObject(clkBody* a_body, clkShape* a_shape);
	void getCellPos(List<V2DF*>* m_pos);
};